home *** CD-ROM | disk | FTP | other *** search
/ Aminet 49 / Aminet 49 (2002)(GTI - Schatztruhe)[!][Jun 2002].iso / Aminet / util / boot / ShellUpdate.lha / NOTES / Shell_RelNotes < prev   
Encoding:
Text File  |  2002-04-01  |  14.8 KB  |  391 lines

  1. Start log thor:
  2.  
  3. Shell V45.0:
  4.  
  5. Oh wow, this was a tough job. The Shell really looked like
  6. some kind of BCPL left-over. It took several days just to
  7. cleanup the code and turn it into something more readable.
  8. BCPL was lurking thru the code all over. No more, folks,
  9. no more...
  10.  
  11. The V40 shell was unable to perform the "implicit CD" command
  12. properly if the directory name was quoted. It inserted an
  13. unnecessary blank space behind the directory name.
  14.  
  15. The shell didn't support multiple backticks on the command line;
  16. the backtick parser was simply broken: Fixed handling of 
  17. asterisk-backtick sequences. The backtick wasn't escaped properly.
  18.  
  19. The shell did not treat TABs as blank spaces. Fixed.
  20.  
  21. Removed the SetClock kludge. Whoever is still using a 1.3
  22. SetClock nowadays cannot be helped anymore and deserves
  23. to be crashed. (-;
  24.  
  25. Added a few missing Forbid/Permit locks around access of
  26. the list of resident commands.
  27.  
  28. Removed an ugly hack to set the RC and Result2 variables;
  29. this really uses now the proper system functions and doesn't
  30. attempt to hack directly into the variable buffers.
  31.  
  32. Reworked the parser a lot; it partially tried to fiddle in
  33. the internal buffers of file handles using structures that
  34. have never been documented. The code now loads full lines
  35. at once (no matter how big they are) and then parses within
  36. its buffers. This removes all dependencies of implementation
  37. details of the file handles.
  38.  
  39. Arguments to redirection did not expand backticks. Fixed.
  40.  
  41. Added a lot of proper error checking if it is low on memory.
  42.  
  43. The internal (and deceased "GlobalVector") is no longer
  44. passed thru to all functions. Instead, I'm now using some
  45. SAS magic to allocate my data segment myself on each
  46. invocaton.
  47.  
  48. Decided not to disable echo-ing for non-interactive shells.
  49. Otherwise, we could not debug scripts or the startup-sequence.
  50. Sorry, Heinz, but I reconsidered and it's really better this
  51. way.
  52.  
  53. Shell V45 re-introduces the handling of the "h" bit. Should it
  54. find a command with "pure" and "h" bits set, it makes the 
  55. command resident automatically. Note that this is (again) the
  56. V39 behaivour. Note that "h" is for "hold", not for "hidden".
  57.  
  58. The shell does no longer limit command lines to 512 characters.
  59. Command lines can now be unlimited in size, provided the
  60. command itself is smaller than the AmigaOs file name size
  61. limit (107 characters). The Shell will now auto-expand all of 
  62. its internal buffers if required to do so. Furthermore, it
  63. uses now memory pools for this kind of administration.
  64.  
  65. The shell offers now extended "script" support. In case a script
  66. file - i.e. a file whose "s" and "e" bits are set - starts with
  67. either the magic characters "#!" or ";!", the string behind this
  68. magic cookie is understood as the path to a command parser that
  69. shall execute this script.
  70.  
  71. Added support for "file browsing". 
  72.  
  73. If the shell encounters now a file as first argument that has
  74. its "e" bit cleared (!) and is parsed and recognized as a data-
  75. type by the data types system, the shell runs a "viewer"
  76. program whose path should be placed in the $VIEWER shell
  77. variable.
  78.  
  79. Added support for "stderr" redirection. Therefore, the V45 
  80. shell introduces three new redirection symbols:
  81.  
  82. *>  filename    : redirects stderr to a file
  83. *>> filename    : appends output to stderr to a file
  84. *><         : redirects stderr to the same file that stdout
  85.           goes into.
  86.  
  87. The shell will also assign the console to the stderr stream
  88. should stderr be an interactive stream.
  89.  
  90. Added support for "script stdin". A "<<" will pull the next
  91. symbol from the shell script and will push all following
  92. lines up to a line starting with this symbol as input into 
  93. the command. Hence, "<<" is exactly the Un*xoid input redirection.
  94.  
  95. Added a new command line token, the "&" character, 
  96. the "implicit run". If found, the shell opens named consoles
  97. with of a name generated thru utility/GetUniqueID(), and assigns
  98. these to the stdin/stdout/stderr of the command, shouldn't 
  99. redirection be used anyhow. Then the command is detached from
  100. the shell segment.
  101.  
  102. Added automatic stack size setup for shell commands. This is a 
  103. new feature that would hopefully limit the number of stack
  104. underflows as it allows application developers to increase the 
  105. stack automatically without the need for stack swap code. The 
  106. shell scans now the first 1K of each segment of a loaded binary 
  107. for the magic cookie "$STACK:". The string behind this cookie 
  108. is expected to be a decimal number, terminated with a line feed 
  109. (and an ASCII NUL, i.e. '\0', as for all C strings).
  110. This number is then interpreted as the stack size in bytes. The shell
  111. will automatically increase the stack size *for this command only*.
  112. If the pre-defined stack size is larger than the program-implicit,
  113. nothing will happen.
  114.  
  115. AGENDA:
  116.  
  117. Rewrite the parser for shell-variables. This looks currently messy
  118. and not very well thought-about. Especially the handling of
  119. asterisks is broken here.
  120.  
  121. Rewrite the parser for backticks. This happend already to some
  122. degree, but it is not yet perfect.
  123.  
  124.  
  125.  
  126. Shell 45.1:
  127.  
  128. The shell did not handle script files correctly that did not end
  129. on a line feed. Fixed.
  130. The shell bootstrap code was partially broken and could not run
  131. the "Initial CLI" correctly. The BCPL startup mechanism was
  132. rewritten completely (to the better).
  133. Incorporated all traditionally resident commands into the Shell-Seg
  134. making this a self-contained shell with a resident segment that
  135. is rom-able and can bootstrap the system.
  136. Rewrote the shell command line parser to some degree. This implies
  137. various changes on how the command line gets interpreted. Good
  138. news is that backticks can now also be used to specify the command
  139. itself, alias [] works within backticks, and backticks cooperate
  140. nicely with aliases in general. Furthermore, the new parser
  141. allows multiple, recursive, but non-looping alias expansion,
  142. and aliases containing backticks that are expanded correctly.
  143.  
  144. Fixed *>< redirection hits. Fixed generation of result codes, the
  145. shell forgot to forward command result codes properly. Fixed
  146. stderr redirection: stderr defaults to stdout, it now defaults
  147. to the shell output stream; hence, an explicit *>< is required
  148. for the old behaivour.
  149.  
  150. Fixed escaping for implicit commands CD,EXECUTE, and others:
  151. They no longer escape " and * if found in an unquoted string.
  152. Note that this is the proper behaivour, even though this is
  153. more a "feature" of ReadItem() than anything else.
  154.  
  155. Fixed the "CD" command: It did not allocate the anchor path
  156. from memory resulting in a possibly mis-aligned "FileInfoBlock"
  157. and damaged memory. Yikes!
  158.  
  159. Fixed the "resident" command: First of all, it also placed
  160. "AnchorPath"s on the stack, which is no good. Second, it did
  161. the printf for the resident command list within a loop while
  162. Forbid(), making the forbid for the list lock pretty much
  163. useless.
  164.  
  165. Reworked set,setenv,alias,unset,unsetenv,unalias: All of
  166. these six commands are handled by the same segment, but the
  167. division into various subcommands happened in a rather
  168. unorthogonal way by second-guessing from the command name.
  169. It is now organized in several segments calling the same
  170. main routine with parameters. "set" became reorganized
  171. a lot as well: "setenv" without parameters is no longer
  172. redirected to "list", making this independent of whether
  173. external commands are available. "set" reformats now ESC
  174. and CSI sequences on the screen consistently by using the
  175. BCPL escape character "*". Other non-printables are (as it 
  176. always has been the case) replaced by the smear-character
  177. 0x7f (DEL).
  178.  
  179. Reworked get, getenv for the same reason: One segment, two
  180. commands.
  181.  
  182. Reworked "run", but not quite as much as I would like to.
  183. This still rolls its own faked input file handle. Even
  184. worse, it gets the command line from the undocumented
  185. internal buffer of its stdin stream. There's currently no
  186. better way of doing it.
  187.  
  188. Added a new option "HEAD" to "path". This will add new paths to
  189. the start of the command search path and will hence search
  190. them first.
  191.  
  192. Reworked "newshell". It no longer tries to place critical
  193. DOS structures on the stack, and will therefore long-word align
  194. them correctly all the time. The window open path of NewShell
  195. has been changed to CON://130/AmigaShell/CLOSE/SHELL to signal
  196. shell usage for console handlers, e.g. ViNCEd.
  197.  
  198. AGENDA:    
  199.  
  200. The shell argument parsing is still somewhat wierd. Backticks
  201. are not recognized as "quotes" and don't group commands
  202. on parsing - this happens only on expanding them. This is
  203. mainly the matter of ReadItem() which should be replaced
  204. by a custom routine. Further, single quotes are not handled
  205. at all. I wonder whether I should touch this or leave it as
  206. "compatibility feature".
  207.  
  208.  
  209.  
  210. Shell 45.2:
  211.  
  212. Fixed several missing error reports, for example for out-of-memory
  213. situations and unability to open redirection files.
  214.  
  215. Changes the style of stderr redirection: Stderr defaults now to
  216. stdout, unless redirected otherwise. This is a compatibility
  217. cludge for <>NIL: type redirection.
  218.  
  219. Redirection with <> checks now explicitly whether the target file
  220. is interactive or NIL: It will fail in all other cases.
  221.  
  222. Redirection into "*" with the run-back operator "&" will now go
  223. into the console owner established for the command output rather
  224. than the current console.
  225.  
  226. Added PushCD, PopCD and SwapCD commands as build-ins.
  227.  
  228. Re-established the "oldredirect" variable. If set to "on", the
  229. shell will check for redirection operators only immediately 
  230. behind the command name and nowhere else. This is a pre-V36
  231. compatibility feature that was dropped in V40 due to limited
  232. ROM space.
  233.  
  234. Added SAVE keyword to UNSETENV to make the changes permanent.
  235.  
  236. Fixed wrong templates for unalias, unset and unsetenv.
  237.  
  238. Reworked ASK a lot; this command allows now numeric and string
  239. input, and places the result either on stdout or into a user
  240. specified local variable.
  241.  
  242.  
  243. Shell 45.3:
  244.  
  245. The "&" symbol was broken in several ways: First of all, it
  246. unlocked home and current directory twice instead of once,
  247. causing possible memory trashes. Further, it did not set
  248. CLI->cli_Module correctly which is required for some run-back
  249. and stay-resident programs. Thrid, it did not check the very
  250. same CLI variable to release the program again, hence might
  251. have even unloaded segments that are not meant to be unloaded.
  252. Fourth, it did not work well with "Execute" due to the rather
  253. clumpsy way the original BCPL shell introduced the execute
  254. logic. The "&" handling was more or less rewritten for the
  255. 45.3. The new logic introduced another kludge in the shell
  256. startup logic (oh no!) but makes it possible to run programs
  257. in background *without* destroying stdin, hence unlike run.
  258. Therefore "run" is more or less obsolete now.
  259.  
  260. The shell command line parser was turned upside down. Nothing
  261. of the old parser is left. The net effect is that the general
  262. logic of argument parsing has been improved much. The shell
  263. now knows on variable expansion and backtick expansion whether
  264. it inserts arguments into quotes, and if so, escapes properly.
  265.  
  266. Fixed handling of aliases in some ways, especially fixed a
  267. bug of the 45.2 where the shell forgot to insert a space.
  268.  
  269. Removed handling of ( and ) in pipes. They aren't used
  270. by any pipe command I know of and are therefore just here to
  271. make the syntax even more cludgy.
  272.  
  273. Fixed handling of interpreter setup by means of #! or #;.
  274. The line behind the magic symbols is now parsed thru ReadItem
  275. and hence requires proper quoting, so beware!
  276.  
  277. Fixed handling of implicit commands on arguments starting
  278. with quotes. The old shell could not run these commands
  279. properly due to unadequate re-escaping of the command argument.
  280. This is now all handled (hopefully correctly) by one common
  281. routine that is also used for variable and backtick sub-
  282. stitution.
  283.  
  284.  
  285. Version 45.4:
  286.  
  287. The 45.3 release caused problems with existing scripts because
  288. quoted variables within quotes where escaped by * such that
  289. double quotes resulted. While this is correct in principle,
  290. it broke already existing scripts. For this reason, a special
  291. rule is now applied: Variables within quotes get their first
  292. pair of surrounding quotes removed. You can avoid this by
  293. setting the variable "keepdoublequotes" to "on":
  294.  
  295. set keepdoublequotes on
  296.  
  297. Pre 45.3 releases generated a wrong error for script files
  298. that are read-protected. Fixed.
  299.  
  300.  
  301.  
  302. Version 45.5:
  303.  
  304. Fixed the parser state machine such that variables of wierd
  305. names like ">t" are possible. The parser used to be quite
  306. inconsistent how to handle them.
  307.  
  308. SwapCD has an optional LEVEL argument that defines which
  309. level of the directory stack to swap with.
  310.  
  311. The stack extension logic scans now the first 4K for the
  312. stack cookie.
  313.  
  314. Setenv SAVE clears now the "e" bit on the saved variables.
  315.  
  316. The asterisk in front of $, [ and ` is now handled
  317. correctly again. * escapes the following character, **
  318. escapes the star from escaping, *** is a double star with
  319. escaped following control character.
  320.  
  321. Added the possibility to check for the existance of a
  322. variable by the $?varname method. $?a will expand to
  323. 1 if a is defined, 0 otherwise. $??a will expand to
  324. 1 only if a is found as a global variable.
  325.  
  326. Fixed handling of quotes in variables and backticks
  327. outside of quotes. Behaivour of the shell depends here now
  328. again on the "keepdoublequotes" variable. If "on", the
  329. quotes are escaped and the full string is put into quotes,
  330. otherwise the string is left alone. If already in quotes,
  331. "keepdoublequotes" = "on" escapes quotes within the
  332. variable body, otherwise the outermost quote gets removed.
  333.  
  334. Fixed the escaping of the rear backtick of a backtick
  335. sequence.
  336.  
  337. StdErr redirection to NIL: by *>NIL: will now clear the
  338. console task for the command to be run.
  339.  
  340. Command interpreters specified by the #! or ;! token may
  341. now get additional arguments specified on this line. The
  342. script file name is inserted between the command and these 
  343. arguments.
  344.  
  345. Fixed the multiple redirection issue. Fixed handling
  346. of alias and redirection. As a side condition, the output
  347. of the "set" and "setenv" commands can now be redirected just
  348. fine.
  349.  
  350.  
  351. Version 45.6:
  352.  
  353. Various minor code cleanup concerning the command buffers;
  354. they are now all static to the functions they belong to.
  355.  
  356. Fixed recognition of $VIEWER which had to be a local variable
  357. to be functional. 
  358.  
  359. Removed beta warning message on startup.
  360.  
  361. The shell scans now all hunks of a loaded binary for the
  362. stack size. Furthermore, several enhanced safety checks have
  363. been added for this feature.
  364.  
  365. Added a german documentation, proof-read and spell-checked
  366. the english documentation.
  367.  
  368.  
  369. Version 45.7:
  370.  
  371. The run-back operator & did not move the shell segment in
  372. the seg-array and hence might have crashed some BCPL commands.
  373.  
  374. The stack size search routine got improved quite a lot and is
  375. now much faster than before - by a factor of four to five.
  376.  
  377. The "setenv" command clears now the "e" bit of the variables
  378. it saves.
  379.  
  380. Added a Shell.guide (Thanks Martin for the help).
  381.  
  382.  
  383. Version 45.8:
  384.  
  385. Fixed handling of backticks within comments. They are now
  386. properly ignored.
  387.  
  388. Fixed handling of equal-signs within arguments. They are
  389. now considered similar to blank spaces and consider
  390. following double-quotes as function, not as literal.
  391.